#{extends 'main.html' /}
#{set title:'View Exam' /}

<h3>Exam ${exam.id}</h3>

<p><a href="@{PageController.printExam(exam.id)}" target="blank">Print Exam</a></p>

<p>Date: ${exam.getDate().format('dd MMM yy')}</p>

#{if session.username && controllers.Secure.Security.invoke("check", "physician")}
	<p>Physician: <a href="@{PageController.physician(exam.physician.id)}">${exam.physician.getName()}</a><br>
	Patient: <a href="@{PageController.patient(exam.patient.id)}">${exam.patient.getName()}</a></p>
#{/if}
#{else}
	<p>Physician: ${exam.physician.getName()}<br>
	Patient: ${exam.patient.getName()}</p>
#{/else}

<a href="@{PageController.downloadVideo(exam.id)}">Download Ultrasound file</a>

<br>
<br>

#{secure.check "physician"}
	<p>Physician Comments:<br>
	<pre>${exam.getPhysicianComments()}</pre>
	</p>
#{/secure.check}

<br>

<p>Patient Comments:<br>
<pre>${exam.getPatientComments()}</pre>
</p>

